//引入进度条
import NProgress from "nprogress";
//引入进度条样式
import "nprogress/nprogress.css";
//引入路由
import router from "./router";

//全局前置路由
router.beforeEach((to, from, next) => { 
    next();
    NProgress.start(); // 开始进度条
});

//全局后置路由
router.afterEach((to, from) => { 
  NProgress.done(); // 结束进度条
});
